<?php
/**
 * This is the index.ctp
 * @access public
 * @version 1.0
 */
?>
<style type="text/css">
    @media only screen and (min-width: 768px) {
        /* Form layouts */
        .inline-label > .label{
            width: 150px;
        }
</style>
<!-- Main content -->
<section role="main" id="main">
    <!-- Header -->
    <?php
        echo $this->element('page_header');
        echo $this->element('navigations/admin_navbar');
    ?>

    <div class="with-padding">
        <div class="columns">
            <div class="new-row-mobile twelve-columns six-columns-tablet twelve-columns-mobile">

                <h3 class="thin underline">Company Information</h3>

                <div id="user-form-window" style="">
                    <div class="user-prompt" ></div>
                    <?php echo $this->Form->create('Organisation', array('default' => false, 'id' => 'org-form', 'url' => array('controller' => 'Administration', 'action' => 'add'),'inputDefaults' => array('label' => false,'div' => false)));?>
                    <fieldset class="fieldset">
                        <legend class="legend">Info</legend>

                        <p class="button-height inline-label">
                            <label class="label">Name</label>
                            <?php echo $this->Form->input('name', array('id'=>'name', 'class' => 'input validate[required] ', 'value'=>''.$Org['Organisation']['name'].'', 'div' => false, 'label' => false,)); ?>
                        </p>
                        <p class="button-height inline-label">
                            <label class="label">Registration Number</label>
                            <?php echo $this->Form->input('registration_number', array('id'=>'registration_number', 'class' => 'input', 'value'=>''.$Org['Organisation']['registration_number'].'', 'div' => false, 'label' => false,)); ?>
                        </p>

                        <p class="button-height inline-label">
                            <label class="label">Date of Establishment:</label>
                            <span class="input">
                                <?php echo $this->Form->input('date_of_establishment', array('type'=>'text','id'=>'date_of_establishment', 'class' => 'input-unstyled',  'value'=>''.$Org['Organisation']['date_of_establishment'].'','readonly' => 'readonly','div' => false, 'label' => false,)); ?>
                                <a href="javascript:void(0)" class="button compact" id="date_of_establishment_btn">Date</a>
                            </span>
                        </p>

                        <p class="button-height inline-label">
                            <label class="label">Location</label>
                            <?php echo $this->Form->input('location', array('id'=>'location', 'type'=>'text', 'class' => 'input', 'value'=>''.$Org['Organisation']['location'].'', 'div' => false, 'label' => false,)); ?>
                        </p>
                        <p class="button-height inline-label">
                            <label class="label">City</label>
                            <?php echo $this->Form->input('city', array('id'=>'city', 'class' => 'input', 'value'=>''.$Org['Organisation']['city'].'', 'div' => false, 'label' => false,)); ?>
                        </p>

                        <p class="button-height inline-label">
                            <label class="label">Country</label>
                            <?php echo $this->Form->input('country', array('id'=>'country', 'type'=>'text', 'class' => 'input', 'value'=>''.$Org['Organisation']['country'].'', 'div' => false, 'label' => false,)); ?>
                        </p>
                        <p class="button-height inline-label">
                            <label class="label">Telephone</label>
                            <?php echo $this->Form->input('tel', array('id'=>'tel', 'type'=>'text', 'class' => 'input', 'value'=>''.$Org['Organisation']['tel'].'', 'div' => false, 'label' => false,)); ?>
                        </p>
                        <p class="button-height inline-label">
                            <label class="label">Fax</label>
                            <?php echo $this->Form->input('fax', array('id'=>'fax', 'type'=>'text', 'class' => 'input', 'value'=>''.$Org['Organisation']['fax'].'', 'div' => false, 'label' => false,)); ?>
                        </p>
                        <p class="button-height inline-label">
                            <label class="label">Email</label>
                            <?php echo $this->Form->input('email', array('id'=>'email', 'type'=>'text', 'class' => 'input', 'value'=>''.$Org['Organisation']['email'].'', 'div' => false, 'label' => false,)); ?>
                        </p>
                        <p class="button-height inline-label">
                            <label class="label">Website</label>
                            <?php echo $this->Form->input('website_address', array('id'=>'website_address', 'type'=>'text', 'class' => 'input', 'value'=>''.$Org['Organisation']['website_address'].'', 'div' => false, 'label' => false,)); ?>
                        </p>
                        <p class="button-height inline-label">
                            <label class="label">Postal Box</label>
                            <?php echo $this->Form->input('postal_box', array('id'=>'postal_box', 'type'=>'text', 'class' => 'input', 'value'=>''.$Org['Organisation']['postal_box'].'', 'div' => false, 'label' => false,)); ?>
                        </p>
                        <?php echo $this->Form->input("Organisation.id", array('type'=>'hidden','id'=>'org-id','label' => false, 'value'=>''.$Org['Organisation']['id'].'')); ?>


                        <p class="button-height inline-label">
                            <label for="save-btn" class="label">&nbsp;</label>
                            <button type="submit" class="button" id="save-btn">
                                <span class="button-icon green-gradient"><span class="icon-download"></span></span>
                                Save
                            </button>

                            <button type="button" class="button" id="cancel-btn">
                                <span class="button-icon anthracite-gradient"><span class="icon-cross-round"></span></span>
                                Cancel
                            </button>
                        </p>
                    </fieldset>
                    <?php echo $this->Form->end();?>
                </div>

            </div>
        </div>
    </div>

</section>
<!-- End main content -->

<!-- Side tabs shortcuts -->
<?php echo $this->element('side_tabs_shortcuts'); ?>
<!-- Sidebar/drop-down menu -->
<?php echo $this->element('right_side_infos'); ?>


<?php
echo $this->Html->script('setup.js');
/** Template functions **/
echo $this->Html->script('developr.input.js');
echo $this->Html->script('developr.message.js');
echo $this->Html->script('developr.modal.js');
echo $this->Html->script('developr.navigable.js');
echo $this->Html->script('developr.notify.js');
echo $this->Html->script('developr.scroll.js');
echo $this->Html->script('developr.progress-slider.js');
echo $this->Html->script('developr.tooltip.js');
echo $this->Html->script('developr.confirm.js');
echo $this->Html->script('developr.agenda.js');
echo $this->Html->script('developr.tabs.js');

echo $this->Html->script('libs/tinycon.min.js');
echo $this->Html->script('custom-scripts/admin/companys_profile.js');

// Charts library
// Load the AJAX API
//echo $this->Html->script('google/jsapi.js');
//echo $this->Html->script('custom-scripts/charts.js');
?>